package com.wjk.kylin.rpc.samples.provider.controller;


import com.wjk.kylin.rpc.samples.api.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * @author wjk
 */
@RestController
public class TestController {

    @Autowired
    private DemoService demoService;

    @GetMapping("/hello/{name}")
    public Long hello(@PathVariable String name) {
        return demoService.sayBye(name);
    }

    @GetMapping("/test")
    public String test() {
        return new Date().toString();
    }
}
